#pragma once
#include <vector>
#include <memory>
#include <conio.h>
#include <iostream>
using namespace std;

typedef unsigned long ulong;
__int64 LongLong2int64(long, unsigned long);
void int64toLongLong(__int64, long&, unsigned long&);

template<class T>
void printBinary(T bin)
{
	vector<bool> digits;
	digits.reserve(sizeof(T) * 8);
	T one = 0x1;
	while(one != 0)
	{
		if(bin & one)
			digits.push_back(true);
		else
			digits.push_back(false);
		one = one << 1;
	}
	for(int i = (int)digits.size() - 1; i >= 0; i--)
	{
		cout << digits[i];
	}
	//cout << endl;
	digits.clear();
}

class LongLong
{
	static unsigned int count;
	long high;
	unsigned long low;
public:
	static unsigned int  Count();
	LongLong(long h = 0, unsigned long l = 0);
	LongLong(const LongLong&);
	LongLong(long long);
	~LongLong(void);
	LongLong& operator=(const LongLong&);
	const LongLong operator+(const LongLong&) const;
	const LongLong operator*(const LongLong&) const;
	const LongLong operator/(const LongLong&) const;
	const LongLong operator-(const LongLong&) const;
	const LongLong operator%(const LongLong&) const;
	const LongLong& operator++();
	const LongLong operator++(int);
	const LongLong& operator--();
	const LongLong operator--(int);
	friend ostream& operator<<(ostream&, const LongLong&);
};

